<?php
class BuyWidget extends CWidget{
    public $limit = 5;
    public function run(){
        $products = Product::buyProduct($this->limit);
        $this->render('buy',array('products' => $products));
    }
}